@charset "utf-8";

* {
    font-family: "微软雅黑", "Microsoft YaHei UI", "Segoe UI", serif ;
}

code *,
code {
    font-family: 'CustomCascadiaMono', 'Consolas', 'Monaco', 'Menlo', 'Courier New', 'Monospace', '微软雅黑', "Microsoft YaHei UI", serif;
    font-size: 14px;
}

.hljs {
    overflow-x: visible !important;
    overflow-y: visible !important;
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
    border:solid 1px gray;
    white-space: normal;
    position: relative;

    > code {
        background: transparent;
        color: inherit;

        &.fold-animation {
            transition: all .5s;
        }

        &.hi {
            width: 100%;
            word-break: break-all;
            overflow: auto;
            height: 100%;
            display: block;
            white-space: break-spaces;
            padding: 10px 20px;
            box-sizing:border-box;
            line-height: 18px;
        }
    }

    > .code-fn-button {
        margin-bottom:5px;
        text-align: right;
        position: absolute;
        top: -30px;
        right: 0;
        height: 32px;
        display: none;
        width: 100%;
        background: rgba(255,255,255,0.3);
    }

    &:hover {
        > .code-fn-button {
            display: block;
        }
    }

    > .code-fn-button  {
        button {
            font-size: 12px;
        }

        .fold-btn {
            display:  inline-block;
        }

        .expand-btn {
            display: none;
        }
    }

    > .flod-ellipsis {
        padding: 0 15px;
        display: none;
        border-radius: 5px;
        bottom:0;
    }

    &.nofold {
        .flod-ellipsis,
        .code-fn-button .fold-btn,
        .code-fn-button .expand-btn {
            display: none !important;
        }
    }

    &.folded:not(.nofold) code {
        max-height: 300px !important;
    }

    &:not(.folded) code {
        overflow: hidden;
    }

    &.folded {
        > .code-fn-button {
            .fold-btn {
                display: none;
            }

            .expand-btn {
                display: inline-block;
            }
        }

        > .flod-ellipsis {
            display: inline-block;
        }
    }
}

.md-content .content {
    color:rgb(51,51,51);

    code:not([class]) {
        color: #d42020;
        background: #eee;
        border-radius: 5px;
        padding: 2px 3px;
        margin-left: 2px;
        margin-right: 1px;
    }

    img {
        max-width:100%;
    }

    table {
        border-collapse: collapse;
    }

    table th,
    table td {
        border: solid #d4d4d4 1px;
        padding: 3px 8px;
    }

    table tr:nth-child(2n) {
        background: #f8f8f8;
    }

    table th {
        background-color: #f8f8f8;
    }

    blockquote {
        background-color: rgba(255,229,100,0.3);
        border-left-color: #ffe564;
        border-left-width: 9px;
        border-left-style: solid;
        padding: 3px 10px;
        margin: 0;
        border-radius: 5px;
        margin-top:10px;

        p {
            margin:0;
        }
    }

    $hFontSize: 40;

    h1,h2,h3,h4,h5,h6 {
        margin:0;
        padding:18px 0;
        transition: all .5s;
        background: transparent;

        &.tem-hi {
            background: orange;
        }

        .link {
            display: none;
            margin-left:15px;
            cursor:pointer;
            font-style: normal;

            &::after {
                content: '引用';
                font-size: 12px;
                height: 100%;
                color:gray;
            }
        }

        &:hover .link {
            display: inline-block;
        }
    }

    h1 {
        border-bottom: solid 1px #e2e2e2;
        padding:26px 0;
        font-size: #{$hFontSize}px;
    }

    $hFontSize: 16;
    h6 {
        font-size: #{$hFontSize}px;
    }

    $hFontSize: $hFontSize + 3;
    h5 {
        font-size: #{$hFontSize}px;
    }

    $hFontSize: $hFontSize + 3;
    h4 {
        font-size: #{$hFontSize}px;
    }

    $hFontSize: $hFontSize + 3;
    h3 {
        padding:20px 0;
        font-size: #{$hFontSize}px;
    }

    $hFontSize: $hFontSize + 3;
    h2 {
        padding:23px 0;
        font-size: #{$hFontSize}px;
    }

    p {
        white-space: pre-line;
        line-height: 30px;
    }

    hr {
        height: 0px;
        width: 100%;
        border: none;
        border-top: solid 1px #dcdcdc;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    a {
        background-color: rgba(187,239,253,0.3);
        border-bottom: 1px solid rgba(0,0,0,0.2);
        color: #1a1a1a;

        &:hover {
            background-color: #bbeffd;
            border-bottom-color: #1a1a1a;
        }
    }

    ul li {
        list-style: disc;
    }

    ul,ol {
        line-height: 26px;
    }


    em {
        code {
            transform: skewX(-15deg);
            display: inline-block;
            font-style: normal;

            height: 18px;
            line-height: 18px;
        }
    }

    s {
        code {
            text-decoration: line-through;
        }
    }

    blockquote {
        code:not([class]) {
            color: #555555;
        }
    }
}

